﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualBasic.ApplicationServices;
using System.Windows;
using System.Windows.Controls;

namespace OrganizeYourSearch.Startups
{
    public class WPFApplication : Application
    {

        private static TagsDataProvider database;
        public static TagsDataProvider Database
        {
            get { return database; }
            set { database = value; }
        }

        public WPFApplication()
        {
            try
            {
                Database = new TagsDataProvider();
            }
            catch (Exception ex)
            {
                MessageBox.Show("From WPFApplication Constructor\n" + ex.Message);
            }

        }
        protected override void OnStartup(System.Windows.StartupEventArgs e)
        {
            base.OnStartup(e);

            Application.Current.Resources.Source =
    new Uri("pack://application:,,,/Fluent;Component/Themes/Office2010/Silver.xaml", UriKind.RelativeOrAbsolute);

            MainWindow mainWin = new MainWindow();
            mainWin.Show();
            this.MainWindow = mainWin;
        }
    }
}
